<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script>
			document.write("-5的绝对值是"+Math.abs(-5)+"<br/>");
			document.write("4.5四舍五入是"+Math.round(4.5)+"<br/>");
			document.write("4.5向上舍入是"+Math.ceil(4.5)+"<br/>");
			document.write("4.5向下舍入是"+Math.floor(4.5)+"<br/>");
			document.write("1和2中小是"+Math.min(1,2)+"<br/>");
			document.write("1和2中大的是"+Math.max(1,2)+"<br/>");
			document.write("2的10次方是"+Math.pow(2,10)+"<br/>");
			
		</script>
		随机产生一个颜色:<input type="color" id="c"/>
		<script>
			var r =  Math.floor(Math.random() * 256).toString(16);
			var g =  Math.floor(Math.random() * 256).toString(16);
			var b =  Math.floor(Math.random() * 256).toString(16);
			var c =  "#"+r+g+b;
			document.getElementById("c").value = c;
		</script>
	</body>
</html>
